package com.bjpowernode.mapper;

import com.bjpowernode.model.BidInfo;
import com.bjpowernode.model.LoanInfo;
import com.bjpowernode.model.ext.BidLoanInfo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface BidInfoMapper {
    /*int deleteByPrimaryKey(Integer id);

    int insert(BidInfo record);

    int insertSelective(BidInfo record);

    BidInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BidInfo record);

    int updateByPrimaryKey(BidInfo record);*/


    //累计投资金额
    BigDecimal selectBidMoney();

    //查询某个产品的最近3条投资记录
   List<BidLoanInfo> selectBidRecordByLoanId(@Param("loanId") Integer loanId);


    //用户的投资记录
    List<BidLoanInfo> selectBidInfoByUid(@Param("uid") Integer uid);

    int insertSelective(BidInfo bidInfo);

    //查询产品的所有投资记录
    List<BidInfo> selectAllByLoanId(@Param("loanId") Integer loanId);
}